import axios from 'axios';

export interface MyCourseRecord {
  id: number;
  name: string;
  description: string;
  peopleNumber: number;
  contributors: {
    name: string;
    email: string;
    avatar: string;
  }[];
}
export function queryMyCourseList() {
  return axios.post('/api/online-study/my-course/list');
}

export interface MyGroupRecord {
  id: number;
  avatar: string;
  name: string;
  peopleNumber: number;
}
export function queryMyGroupList() {
  return axios.post('/api/online-study/my-team/list');
}

export interface LatestNews {
  id: number;
  title: string;
  description: string;
  avatar: string;
}
export function queryLatestNews() {
  return axios.post<LatestNews[]>('/api/online-study/latest-activity');
}
